<?php
	
	if(isset($_GET['quyen']))
	{
		$nguoidung = new nguoidungbs();
		
		$MaND = $_GET['id'];
		$QuyenHan = $_GET['quyen'];
		$nguoidung->MaNguoiDung = $MaND;
		$nguoidung->QuyenHan = $QuyenHan;
		
		$kq = $nguoidung->Active();
		
		if($kq)
			header("Location: index.php?do=nguoidung");
		else
			ThongBaoLoi("Lỗi truy vấn!");
	}
	elseif(isset($_GET['khoa']))
	{
		$nguoidung = new nguoidungbs();
		$MaND = $_GET['id'];
		$Khoa = $_GET['khoa'];
		$nguoidung->MaNguoiDung = $MaND;
		$nguoidung->Khoa = $Khoa;
		
		$kq = $nguoidung->Active();
		
		if($kq)
			header("Location: index.php?do=nguoidung");
		else
			ThongBaoLoi("Lỗi truy vấn!");
	}
	else
	{
		header("Location: index.php?do=nguoidung");
	}
?>